package com.ruoyi.oa.domain.bo;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 出差申请业务对象 oa_finance_trip_apply
 *
 * @author zhoul
 * @date 2023-03-28
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class OaFinanceTripApplyBo extends BaseEntity {

    /**
     * 主键ID
     */
    @NotBlank(message = "主键ID不能为空", groups = { EditGroup.class })
    private String id;

    /**
     * 所属项目
     */
    @NotBlank(message = "项目名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String projectName;

    /**
     * 出差事由
     */
    @NotBlank(message = "出差事由不能为空", groups = { AddGroup.class, EditGroup.class })
    private String tripReason;

    /**
     * 出发地点
     */
    @NotBlank(message = "出发地点不能为空", groups = { AddGroup.class, EditGroup.class })
    private String originPlace;

    /**
     * 出差地点
     */
    @NotBlank(message = "出差地点不能为空", groups = { AddGroup.class, EditGroup.class })
    private String destination;

    /**
     * 出差开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    @NotNull(message = "开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date startDate;

    /**
     * 出差结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    @NotNull(message = "结束时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date endDate;

    /**
     * 出差时长
     */
    @NotNull(message = "出差时长不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer duration;

    /**
     * 上传图片的OSS ID
     */
    private String attachment;

    /**
     * 提交起止范围
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private List<Date> submitTimeList;

    /**
     * 出差起止范围
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private List<Date> tripTimeList;

    /**
     * 提交人
     */
    private String createBy;

    /**
     * 流程状态
     */
    private String status;

    /**
    出差时长最小值
     */
    private Integer durationMin;

    /**
     出差时长最大值
     */
    private Integer durationMax;

    /**
     * 部门id
     */
    private Long deptId;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 创建
     */
    private String createUser;
}
